package ooday05;

public class EnumTest {
    public static void main(String[] args) {
//        Seasons s = Seasons.SPRING;
//        switch (s) {
//            case SPRING:
//                System.out.println("春天到了");
//                break;
//            case SUMMER:
//                System.out.println("夏天到了");
//                break;
//            case AUTUMN:
//                System.out.println("秋天到了");
//                break;
//            case WINTER:
//                System.out.println("冬天到了");
        //default 这里不需要 因为枚举设定了只有这四种情况
//    }
        Seasons[] seasons = Seasons.values();//获取所有枚举对象
        for (int i = 0; i < seasons.length; i++) {
            System.out.println(seasons[i]);
        }

    }
}

